/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jkoa.model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author fikri
 */
@Entity
@Table(name = "akademik")
@NamedQueries({
    @NamedQuery(name = "Akademik.findAll", query = "SELECT a FROM Akademik a")})
public class Akademik implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id_akademik")
    private Integer idAkademik;
    @Column(name = "id_mohon")
    private Integer idMohon;
    @Column(name = "id_pekerja")
    private Integer idPekerja;
    @Basic(optional = false)
    @Column(name = "kod_akademik")
    private String kodAkademik;
    @Basic(optional = false)
    @Column(name = "dimasuk")
    private String dimasuk;
    @Basic(optional = false)
    @Column(name = "trh_masuk")
    @Temporal(TemporalType.TIMESTAMP)
    private Date trhMasuk;
    @Column(name = "dikkini")
    private String dikkini;
    @Column(name = "trh_kkini")
    @Temporal(TemporalType.TIMESTAMP)
    private Date trhKkini;

    public Akademik() {
    }

    public Akademik(Integer idAkademik) {
        this.idAkademik = idAkademik;
    }

    public Akademik(Integer idAkademik, String kodAkademik, String dimasuk, Date trhMasuk) {
        this.idAkademik = idAkademik;
        this.kodAkademik = kodAkademik;
        this.dimasuk = dimasuk;
        this.trhMasuk = trhMasuk;
    }

    public Integer getIdAkademik() {
        return idAkademik;
    }

    public void setIdAkademik(Integer idAkademik) {
        this.idAkademik = idAkademik;
    }

    public Integer getIdMohon() {
        return idMohon;
    }

    public void setIdMohon(Integer idMohon) {
        this.idMohon = idMohon;
    }

    public Integer getIdPekerja() {
        return idPekerja;
    }

    public void setIdPekerja(Integer idPekerja) {
        this.idPekerja = idPekerja;
    }

    public String getKodAkademik() {
        return kodAkademik;
    }

    public void setKodAkademik(String kodAkademik) {
        this.kodAkademik = kodAkademik;
    }

    public String getDimasuk() {
        return dimasuk;
    }

    public void setDimasuk(String dimasuk) {
        this.dimasuk = dimasuk;
    }

    public Date getTrhMasuk() {
        return trhMasuk;
    }

    public void setTrhMasuk(Date trhMasuk) {
        this.trhMasuk = trhMasuk;
    }

    public String getDikkini() {
        return dikkini;
    }

    public void setDikkini(String dikkini) {
        this.dikkini = dikkini;
    }

    public Date getTrhKkini() {
        return trhKkini;
    }

    public void setTrhKkini(Date trhKkini) {
        this.trhKkini = trhKkini;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idAkademik != null ? idAkademik.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Akademik)) {
            return false;
        }
        Akademik other = (Akademik) object;
        if ((this.idAkademik == null && other.idAkademik != null) || (this.idAkademik != null && !this.idAkademik.equals(other.idAkademik))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.jkoa.model.Akademik[ idAkademik=" + idAkademik + " ]";
    }
    
}
